import request from '../index'

export interface GetWorkOrderList {
  SceneType?: string
  DealWithStatus?: string
  DealerName?: string
  Page: number
  Limit: number
  Sort?: string
  DateStart?: string
  DateEnd?: string
}
export interface UpdateWorkOrder {
  Id: number | undefined
  BsId?: string
  BsName?: string
  SceneType?: string
  WorkType?: string
  RoomNo?: string
  Note?: string
  CreationDate?: Date
  PushMsgStatus?: number
  PushMsgDate?: Date
  DealWithStatus?: string
  DealWithDate?: Date
  DealerId?: string
  DealerName?: string
}
// 获取工单列表
export function getWorkOrderList(data: GetWorkOrderList) {
  return request({
    url: '/WeChat/WorkOrders',
    data
  })
}
// 获取工单详情
export function getWorkOrder(id: number | string) {
  return request({
    url: '/WeChat/WorkOrder',
    data: {
      id
    }
  })
}
// 更新工单
export function updateWorkOrder(data: UpdateWorkOrder) {
  return request({
    url: '/WeChat/WorkOrder',
    method: 'put',
    data
  })
}
